package nrrg.zhujuxing.application.learnscala

import scala.util.control.Breaks._

object processControl {
  def main(args: Array[String]): Unit = {

    breakable {
      for (i <- 1 to 10) {
        println(i)
        if (i == 5) {
          break()
        }
      }
    }

    val a = for (i <- 1 to 10) yield {
      i * 2
    }
    println(a)
  }

}
